<?php



/**
 * This class defines the structure of the 'task_goals' table.
 *
 *
 *
 * This map class is used by Propel to do runtime db structure discovery.
 * For example, the createSelectSql() method checks the type of a given column used in an
 * ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
 * (i.e. if it's a text column type).
 *
 * @package    propel.generator.empeval.map
 */
class EmpevalTaskGoalsTableMap extends TableMap
{

    /**
     * The (dot-path) name of this class
     */
    const CLASS_NAME = 'empeval.map.EmpevalTaskGoalsTableMap';

    /**
     * Initialize the table attributes, columns and validators
     * Relations are not initialized by this method since they are lazy loaded
     *
     * @return void
     * @throws PropelException
     */
    public function initialize()
    {
        // attributes
        $this->setName('task_goals');
        $this->setPhpName('TaskGoals');
        $this->setClassname('EmpevalTaskGoals');
        $this->setPackage('empeval');
        $this->setUseIdGenerator(true);
        // columns
        $this->addPrimaryKey('ID', 'Id', 'INTEGER', true, 4, null);
        $this->addForeignKey('BONUS_GOALS_FORM_ID', 'BonusGoalsFormId', 'INTEGER', 'bonus_goals_forms', 'ID', true, 4, null);
        $this->addForeignKey('BONUS_GOALS_FORM_ID', 'BonusGoalsFormId', 'INTEGER', 'view_bgf_with_superior_position_id', 'ID', true, 4, null);
        $this->addForeignKey('BONUS_GOALS_FORM_ID', 'BonusGoalsFormId', 'INTEGER', 'view_bonus_report', 'BONUS_GOALS_FORM_ID', true, 4, null);
        $this->addForeignKey('QUALITY_CRITERIA_ID', 'QualityCriteriaId', 'INTEGER', 'quality_criteria', 'ID', false, 4, null);
        $this->addColumn('BONUS_GOAL_DESC', 'BonusGoalDesc', 'LONGVARCHAR', false, 2147483647, null);
        $this->addColumn('WEIGHT', 'Weight', 'TINYINT', false, 1, null);
        $this->addColumn('REALIZATION_80', 'Realization80', 'VARCHAR', false, 30, null);
        $this->addColumn('REALIZATION_100', 'Realization100', 'VARCHAR', false, 30, null);
        $this->addColumn('MONITORING', 'Monitoring', 'LONGVARCHAR', false, 2147483647, null);
        $this->addForeignKey('SELF_APPRAISAL_ID', 'SelfAppraisalId', 'INTEGER', 'self_appraisals', 'ID', false, 4, null);
        $this->addColumn('RESULT_ACHIEVED', 'ResultAchieved', 'VARCHAR', false, 30, null);
        $this->addColumn('RESULT', 'Result', 'DECIMAL', false, 15, null);
        $this->addColumn('WEIGHT_RESULT', 'WeightResult', 'DECIMAL', false, 15, null);
        $this->addColumn('COMMENT', 'Comment', 'LONGVARCHAR', false, 2147483647, null);
        $this->addColumn('STATUS', 'Status', 'TINYINT', true, 1, 1);
        $this->addColumn('LAST_MODIFIED', 'LastModified', 'TIMESTAMP', false, 16, null);
        $this->addColumn('CREATED', 'Created', 'TIMESTAMP', true, 16, '');
        // validators
    } // initialize()

    /**
     * Build the RelationMap objects for this table relationships
     */
    public function buildRelations()
    {
        $this->addRelation('BonusGoalsForms', 'EmpevalBonusGoalsForms', RelationMap::MANY_TO_ONE, array('bonus_goals_form_id' => 'id', ), null, null);
        $this->addRelation('ViewBgfWithSuperiorPositionId', 'EmpevalViewBgfWithSuperiorPositionId', RelationMap::MANY_TO_ONE, array('bonus_goals_form_id' => 'id', ), null, null);
        $this->addRelation('ViewBonusReport', 'EmpevalViewBonusReport', RelationMap::MANY_TO_ONE, array('bonus_goals_form_id' => 'bonus_goals_form_id', ), null, null);
        $this->addRelation('QualityCriteria', 'EmpevalQualityCriteria', RelationMap::MANY_TO_ONE, array('quality_criteria_id' => 'id', ), null, null);
        $this->addRelation('SelfAppraisals', 'EmpevalSelfAppraisals', RelationMap::MANY_TO_ONE, array('self_appraisal_id' => 'id', ), null, null);
    } // buildRelations()

} // EmpevalTaskGoalsTableMap
